<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<head>
<title>IGNORED</title>
</head>
<body>
	<ui:composition>
		<f:event listener="#{messageController.initBlogs}"
			type="preRenderComponent"></f:event>
		<p:panel id="newsPanel" header="#{msgs.news}" style="width:100%"
			toggleable="true">

			<p:dataGrid var="news" value="#{messageModel.list}" columns="1"
				rows="15">
				<p:column>
					<h:panelGrid border="0" columns="1">
						<h:panelGrid columns="1" cellspacing="5px" style="border:0px">
							<h:panelGrid columns="2" style="width:100%">
								<p:commandLink value="#{news.titleLabel}" ajax="true"
									update=":rightForm" style="font-size:1.2em;font-weight:bold;color:green">
									<f:setPropertyActionListener value="#{true}"
										target="#{news.selected}" />
								</p:commandLink>
								<h:outputText value="#{news.publishedDate}" style="float:right">
									<f:convertDateTime pattern="yyyy-MM-dd"></f:convertDateTime>
								</h:outputText>
							</h:panelGrid>


							<h:panelGroup>
								<p:outputPanel rendered="#{news.selected}" autoUpdate="true">
									<h:outputText value="#{news.contentLabel}" escape="false"
										style="font-size:1.3em;font-family:Monospace"  />
									<h:graphicImage id="blogPicture" width="220" height="175"
										value="../#{news.primaryPicture.fullFileName}"
										rendered="#{news.primaryPicture != null}" />
								</p:outputPanel>

								<p:commandLink value="#{msgs.hide}" ajax="true"
									update=":rightForm" rendered="#{news.selected}"
									style="color:blue;">
									<f:setPropertyActionListener value="#{false}"
										target="#{news.selected}" />
								</p:commandLink>

							</h:panelGroup>

						</h:panelGrid>
					</h:panelGrid>
				</p:column>
			</p:dataGrid>
		</p:panel>
	</ui:composition>
</body>
</html>